package com.shanpin.shebao.admin.module.material.model;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import org.springframework.jdbc.core.RowMapper;

import com.shanpin.core.utils.DateUtil;

public class MaterialFlowResp {

	private int f_id;
	private int source;
	private String source_name;
	private int source_op;
	private int source_type;
	private int u_id;
	private String phone;
	private String city_code;
	private String user_name;
	private String id_card;
	private int flow_status;
	private int cur_node_type;
	private int todo_flag;
	private String memo;
	private String memo_op;
	private String create_time;
	private String update_time;
	
	public static RowMapper<MaterialFlowResp> mapper = new RowMapper<MaterialFlowResp>() {
		@Override
		public MaterialFlowResp mapRow(ResultSet rs, int rowNum) throws SQLException {
			MaterialFlowResp mf = new MaterialFlowResp();
			mf.f_id = rs.getInt("f_id");
			mf.source = rs.getInt("source");
			mf.source_op = rs.getInt("source_op");
			mf.source_type = rs.getInt("source_type");
			mf.u_id = rs.getInt("u_id");
			mf.phone = rs.getString("phone");
			mf.city_code = rs.getInt("city_code") < 1 ? "" : rs.getInt("city_code")+"";
			mf.user_name = rs.getString("user_name");
			mf.id_card = rs.getString("id_card");
			mf.flow_status = rs.getInt("flow_status");
			mf.cur_node_type = rs.getInt("cur_node_type");
			mf.todo_flag = rs.getInt("todo_flag");
			mf.memo = rs.getString("memo");
			mf.memo_op = rs.getString("memo_op");
			mf.create_time = DateUtil.dateStr(new Date(rs.getTimestamp("create_time").getTime()));
			mf.update_time = DateUtil.dateStr(new Date(rs.getTimestamp("update_time").getTime()));
			return mf;
		}
	};
	public int getF_id() {
		return f_id;
	}
	public void setF_id(int f_id) {
		this.f_id = f_id;
	}
	public int getSource() {
		return source;
	}
	public void setSource(int source) {
		this.source = source;
	}
	public String getSource_name() {
		return source_name;
	}
	public void setSource_name(String source_name) {
		this.source_name = source_name;
	}
	public int getSource_op() {
		return source_op;
	}
	public void setSource_op(int source_op) {
		this.source_op = source_op;
	}
	public int getSource_type() {
		return source_type;
	}
	public void setSource_type(int source_type) {
		this.source_type = source_type;
	}
	public int getU_id() {
		return u_id;
	}
	public void setU_id(int u_id) {
		this.u_id = u_id;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getCity_code() {
		return city_code;
	}
	public void setCity_code(String city_code) {
		this.city_code = city_code;
	}
	public String getUser_name() {
		return user_name;
	}
	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}
	public String getId_card() {
		return id_card;
	}
	public void setId_card(String id_card) {
		this.id_card = id_card;
	}
	public int getFlow_status() {
		return flow_status;
	}
	public void setFlow_status(int flow_status) {
		this.flow_status = flow_status;
	}
	public int getCur_node_type() {
		return cur_node_type;
	}
	public void setCur_node_type(int cur_node_type) {
		this.cur_node_type = cur_node_type;
	}
	public int getTodo_flag() {
		return todo_flag;
	}
	public void setTodo_flag(int todo_flag) {
		this.todo_flag = todo_flag;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	public String getMemo_op() {
		return memo_op;
	}
	public void setMemo_op(String memo_op) {
		this.memo_op = memo_op;
	}
	public String getCreate_time() {
		return create_time;
	}
	public void setCreate_time(String create_time) {
		this.create_time = create_time;
	}
	public String getUpdate_time() {
		return update_time;
	}
	public void setUpdate_time(String update_time) {
		this.update_time = update_time;
	}
}
